<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>Aria: ArRobotPacketReceiver Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Aria
   &#160;<span id="projectnumber">2.9.4</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li><a href="examples.html"><span>Examples</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('classArRobotPacketReceiver.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-types">Protected Types</a> &#124;
<a href="#pro-attribs">Protected Attributes</a> &#124;
<a href="classArRobotPacketReceiver-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">ArRobotPacketReceiver Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Given a device connection it receives packets from the robot through it.  
 <a href="classArRobotPacketReceiver.html#details">More...</a></p>

<p><code>#include &lt;ArRobotPacketReceiver.h&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:ad977f81f61fa0424e6629c0d69703ce8"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArRobotPacketReceiver.html#ad977f81f61fa0424e6629c0d69703ce8">ArRobotPacketReceiver</a> (bool allocatePackets=false, unsigned char sync1=0xfa, unsigned char sync2=0xfb)</td></tr>
<tr class="memdesc:ad977f81f61fa0424e6629c0d69703ce8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor without an already assigned device connection.  <a href="#ad977f81f61fa0424e6629c0d69703ce8">More...</a><br /></td></tr>
<tr class="separator:ad977f81f61fa0424e6629c0d69703ce8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7300c31a57c8d270840c60ca2dc30db8"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArRobotPacketReceiver.html#a7300c31a57c8d270840c60ca2dc30db8">ArRobotPacketReceiver</a> (<a class="el" href="classArDeviceConnection.html">ArDeviceConnection</a> *deviceConnection, bool allocatePackets=false, unsigned char sync1=0xfa, unsigned char sync2=0xfb)</td></tr>
<tr class="memdesc:a7300c31a57c8d270840c60ca2dc30db8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor with assignment of a device connection.  <a href="#a7300c31a57c8d270840c60ca2dc30db8">More...</a><br /></td></tr>
<tr class="separator:a7300c31a57c8d270840c60ca2dc30db8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9e086e269bdfc7f027cd9e95cc612716"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArRobotPacketReceiver.html#a9e086e269bdfc7f027cd9e95cc612716">ArRobotPacketReceiver</a> (<a class="el" href="classArDeviceConnection.html">ArDeviceConnection</a> *deviceConnection, bool allocatePackets, unsigned char sync1, unsigned char sync2, bool tracking, const char *trackingLogName)</td></tr>
<tr class="memdesc:a9e086e269bdfc7f027cd9e95cc612716"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor with assignment of a device connection and tracking.  <a href="#a9e086e269bdfc7f027cd9e95cc612716">More...</a><br /></td></tr>
<tr class="separator:a9e086e269bdfc7f027cd9e95cc612716"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab3dd0d6c6429dedc43019e0a160e4e9a"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab3dd0d6c6429dedc43019e0a160e4e9a"></a>
<a class="el" href="classArDeviceConnection.html">ArDeviceConnection</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArRobotPacketReceiver.html#ab3dd0d6c6429dedc43019e0a160e4e9a">getDeviceConnection</a> (void)</td></tr>
<tr class="memdesc:ab3dd0d6c6429dedc43019e0a160e4e9a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the device this instance receives packets from. <br /></td></tr>
<tr class="separator:ab3dd0d6c6429dedc43019e0a160e4e9a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2dadbd27727230ee03a2f32a6bf4110c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2dadbd27727230ee03a2f32a6bf4110c"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArRobotPacketReceiver.html#a2dadbd27727230ee03a2f32a6bf4110c">isAllocatingPackets</a> (void)</td></tr>
<tr class="memdesc:a2dadbd27727230ee03a2f32a6bf4110c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets whether or not the receiver is allocating packets. <br /></td></tr>
<tr class="separator:a2dadbd27727230ee03a2f32a6bf4110c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac6507210fc1ff98c0fbe565133b4fa8a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classArRobotPacket.html">ArRobotPacket</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArRobotPacketReceiver.html#ac6507210fc1ff98c0fbe565133b4fa8a">receivePacket</a> (unsigned int msWait=0)</td></tr>
<tr class="memdesc:ac6507210fc1ff98c0fbe565133b4fa8a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Receives a packet from the robot if there is one available.  <a href="#ac6507210fc1ff98c0fbe565133b4fa8a">More...</a><br /></td></tr>
<tr class="separator:ac6507210fc1ff98c0fbe565133b4fa8a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acce58c65f51f1c34e3ec4579a261b96c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="acce58c65f51f1c34e3ec4579a261b96c"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArRobotPacketReceiver.html#acce58c65f51f1c34e3ec4579a261b96c">setAllocatingPackets</a> (bool allocatePackets)</td></tr>
<tr class="memdesc:acce58c65f51f1c34e3ec4579a261b96c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets whether or not the receiver is allocating packets. <br /></td></tr>
<tr class="separator:acce58c65f51f1c34e3ec4579a261b96c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8a3134bab0053f5b47a58ad2bf7bbb52"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8a3134bab0053f5b47a58ad2bf7bbb52"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArRobotPacketReceiver.html#a8a3134bab0053f5b47a58ad2bf7bbb52">setDeviceConnection</a> (<a class="el" href="classArDeviceConnection.html">ArDeviceConnection</a> *deviceConnection)</td></tr>
<tr class="memdesc:a8a3134bab0053f5b47a58ad2bf7bbb52"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the device this instance receives packets from. <br /></td></tr>
<tr class="separator:a8a3134bab0053f5b47a58ad2bf7bbb52"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4cd19557aed8e74d4541b1fad34183c2"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArRobotPacketReceiver.html#a4cd19557aed8e74d4541b1fad34183c2">setPacketReceivedCallback</a> (<a class="el" href="classArFunctor1.html">ArFunctor1</a>&lt; <a class="el" href="classArRobotPacket.html">ArRobotPacket</a> * &gt; *functor)</td></tr>
<tr class="memdesc:a4cd19557aed8e74d4541b1fad34183c2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the callback that gets called with the finalized version of every packet set...  <a href="#a4cd19557aed8e74d4541b1fad34183c2">More...</a><br /></td></tr>
<tr class="separator:a4cd19557aed8e74d4541b1fad34183c2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abdd9e629bd62268b12eec4e98728a8ec"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="abdd9e629bd62268b12eec4e98728a8ec"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>setTracking</b> (bool tracking)</td></tr>
<tr class="separator:abdd9e629bd62268b12eec4e98728a8ec"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7c48a05921a8a711c234851c3e098df3"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7c48a05921a8a711c234851c3e098df3"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>setTrackingLogName</b> (const char *trackingLogName)</td></tr>
<tr class="separator:a7c48a05921a8a711c234851c3e098df3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aca786108e4a81824e1dbdbad9e783e01"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aca786108e4a81824e1dbdbad9e783e01"></a>
virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArRobotPacketReceiver.html#aca786108e4a81824e1dbdbad9e783e01">~ArRobotPacketReceiver</a> ()</td></tr>
<tr class="memdesc:aca786108e4a81824e1dbdbad9e783e01"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor. <br /></td></tr>
<tr class="separator:aca786108e4a81824e1dbdbad9e783e01"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-types"></a>
Protected Types</h2></td></tr>
<tr class="memitem:a45385c23145e1b9a342dbb97f450b1c9"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a45385c23145e1b9a342dbb97f450b1c9"></a>enum &#160;</td><td class="memItemRight" valign="bottom">{ <b>STATE_SYNC1</b>, 
<b>STATE_SYNC2</b>, 
<b>STATE_ACQUIRE_DATA</b>
 }</td></tr>
<tr class="separator:a45385c23145e1b9a342dbb97f450b1c9"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr class="memitem:aed4609a946ef98f92bbe31dcec18a1b1"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aed4609a946ef98f92bbe31dcec18a1b1"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>myAllocatePackets</b></td></tr>
<tr class="separator:aed4609a946ef98f92bbe31dcec18a1b1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a181e24921c72f791df3f288ffacc385e"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a181e24921c72f791df3f288ffacc385e"></a>
<a class="el" href="classArDeviceConnection.html">ArDeviceConnection</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>myDeviceConn</b></td></tr>
<tr class="separator:a181e24921c72f791df3f288ffacc385e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:add6a690af51fa9ed1a9f9f0c4697bb7b"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="add6a690af51fa9ed1a9f9f0c4697bb7b"></a>
<a class="el" href="classArRobotPacket.html">ArRobotPacket</a>&#160;</td><td class="memItemRight" valign="bottom"><b>myPacket</b></td></tr>
<tr class="separator:add6a690af51fa9ed1a9f9f0c4697bb7b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a149b53878915fca17121ab525f30d735"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a149b53878915fca17121ab525f30d735"></a>
<a class="el" href="classArFunctor1.html">ArFunctor1</a>&lt; <a class="el" href="classArRobotPacket.html">ArRobotPacket</a> * &gt; *&#160;</td><td class="memItemRight" valign="bottom"><b>myPacketReceivedCallback</b></td></tr>
<tr class="separator:a149b53878915fca17121ab525f30d735"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0959b827aff3b9aae5a128ab35c130af"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0959b827aff3b9aae5a128ab35c130af"></a>
unsigned char&#160;</td><td class="memItemRight" valign="bottom"><b>mySync1</b></td></tr>
<tr class="separator:a0959b827aff3b9aae5a128ab35c130af"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab0f7be9d2436305089e39b71dd30af3e"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab0f7be9d2436305089e39b71dd30af3e"></a>
unsigned char&#160;</td><td class="memItemRight" valign="bottom"><b>mySync2</b></td></tr>
<tr class="separator:ab0f7be9d2436305089e39b71dd30af3e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad81390f7e36656460a22f116599072fd"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad81390f7e36656460a22f116599072fd"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>myTracking</b></td></tr>
<tr class="separator:ad81390f7e36656460a22f116599072fd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7deb34a2f1a89083843eceadbb5a0398"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7deb34a2f1a89083843eceadbb5a0398"></a>
std::string&#160;</td><td class="memItemRight" valign="bottom"><b>myTrackingLogName</b></td></tr>
<tr class="separator:a7deb34a2f1a89083843eceadbb5a0398"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Given a device connection it receives packets from the robot through it. </p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="ad977f81f61fa0424e6629c0d69703ce8"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ArRobotPacketReceiver::ArRobotPacketReceiver </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>allocatePackets</em> = <code>false</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned char&#160;</td>
          <td class="paramname"><em>sync1</em> = <code>0xfa</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned char&#160;</td>
          <td class="paramname"><em>sync2</em> = <code>0xfb</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Constructor without an already assigned device connection. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">allocatePackets</td><td>whether to allocate memory for the packets before returning them (true) or to just return a pointer to an internal packet (false)... most everything should use false as this will help prevent many memory leaks or corruptions </td></tr>
    <tr><td class="paramname">sync1</td><td>first byte of the header this receiver will receive, this should be left as the default in nearly all cases, ie don't mess with it </td></tr>
    <tr><td class="paramname">sync2</td><td>second byte of the header this receiver will receive, this should be left as the default in nearly all cases, ie don't mess with it </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a7300c31a57c8d270840c60ca2dc30db8"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ArRobotPacketReceiver::ArRobotPacketReceiver </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classArDeviceConnection.html">ArDeviceConnection</a> *&#160;</td>
          <td class="paramname"><em>deviceConnection</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>allocatePackets</em> = <code>false</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned char&#160;</td>
          <td class="paramname"><em>sync1</em> = <code>0xfa</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned char&#160;</td>
          <td class="paramname"><em>sync2</em> = <code>0xfb</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Constructor with assignment of a device connection. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">deviceConnection</td><td>the connection which the receiver will use </td></tr>
    <tr><td class="paramname">allocatePackets</td><td>whether to allocate memory for the packets before returning them (true) or to just return a pointer to an internal packet (false)... most everything should use false as this will help prevent many memory leaks or corruptions </td></tr>
    <tr><td class="paramname">sync1</td><td>first byte of the header this receiver will receive, this should be left as the default in nearly all cases, ie don't mess with it </td></tr>
    <tr><td class="paramname">sync2</td><td>second byte of the header this receiver will receive, this should be left as the default in nearly all cases, ie don't mess with it </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a9e086e269bdfc7f027cd9e95cc612716"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ArRobotPacketReceiver::ArRobotPacketReceiver </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classArDeviceConnection.html">ArDeviceConnection</a> *&#160;</td>
          <td class="paramname"><em>deviceConnection</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>allocatePackets</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned char&#160;</td>
          <td class="paramname"><em>sync1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned char&#160;</td>
          <td class="paramname"><em>sync2</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>tracking</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>trackingLogName</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Constructor with assignment of a device connection and tracking. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">deviceConnection</td><td>the connection which the receiver will use </td></tr>
    <tr><td class="paramname">allocatePackets</td><td>whether to allocate memory for the packets before returning them (true) or to just return a pointer to an internal packet (false)... most everything should use false as this will help prevent many memory leaks or corruptions </td></tr>
    <tr><td class="paramname">sync1</td><td>first byte of the header this receiver will receive, this should be left as the default in nearly all cases, ie don't mess with it </td></tr>
    <tr><td class="paramname">sync2</td><td>second byte of the header this receiver will receive, this should be left as the default in nearly all cases, ie don't mess with it </td></tr>
    <tr><td class="paramname">tracking</td><td>if true write log messages for packets received </td></tr>
    <tr><td class="paramname">trackingLogName</td><td>name to include for packets with tracking log messages </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="ac6507210fc1ff98c0fbe565133b4fa8a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classArRobotPacket.html">ArRobotPacket</a> * ArRobotPacketReceiver::receivePacket </td>
          <td>(</td>
          <td class="paramtype">unsigned int&#160;</td>
          <td class="paramname"><em>msWait</em> = <code>0</code></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Receives a packet from the robot if there is one available. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">msWait</td><td>how long to block for the start of a packet, nonblocking if 0 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>NULL if there are no packets in alloted time, the device connection is closed, or other error. Otherwise a pointer to the packet received is returned. If allocatePackets is true than the caller must delete the packet. If allocatePackets is false then the packet object will be reused in the next call; the caller must not store or use that packet object. </dd></dl>
<p>this case can't happen since c can't be over that so taking it out if (c &gt; 255) { <a class="el" href="classArLog.html#a43a8b3789126c818f390f24bdbceccce" title="Log a message, with formatting and variable number of arguments. ">ArLog::log</a>(<a class="el" href="classArLog.html#ac8cc0fb3aa323ab2a1c21340fdd1dce3a7040faf60eeb155eaa85d439b1066ca1" title="Use normal logging. ">ArLog::Normal</a>, "ArRobotPacketReceiver::receivePacket: bad packet, more than 255 bytes"); state = STATE_SYNC1; break; }</p>

</div>
</div>
<a class="anchor" id="a4cd19557aed8e74d4541b1fad34183c2"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ArRobotPacketReceiver::setPacketReceivedCallback </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classArFunctor1.html">ArFunctor1</a>&lt; <a class="el" href="classArRobotPacket.html">ArRobotPacket</a> * &gt; *&#160;</td>
          <td class="paramname"><em>functor</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sets the callback that gets called with the finalized version of every packet set... </p>
<p>this is ONLY for very internal very specialized use </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>ArRobotPacketReceiver.h</li>
<li>ArRobotPacketReceiver.cpp</li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="classArRobotPacketReceiver.html">ArRobotPacketReceiver</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
  </ul>
</div>
</body>
</html>
